import messages from './locale/index.js'

let i18nConfig = {
	locale: uni.getLocale(),
	messages
}


// add by zhanghaomiao request
import { api, rootUrl } from '@/api/api.js'
import { requests } from '@/api/request.js'
import { http } from '@/http/index.js'

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
import { createI18n } from 'vue-i18n'
const i18n = createI18n(i18nConfig)
export function createApp() {
	const app = createSSRApp(App)
	app.use(i18n)
	app.config.globalProperties.$request = requests;
	// app.config.globalProperties.$request = requests;
	app.config.globalProperties.$api = api;
	app.config.globalProperties.$http = http;
	// app.config.globalProperties.$rootUrl = rootUrl;

	return {
		app
	}
}
// #endif